package com.hl.ruoyilkshop.domain.vo;

import java.util.List;
import java.util.ArrayList;

/**
 * 商品规格树形结构VO
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
public class GoodsSpecsTreeVO
{
    /** 规格ID */
    private Integer goodsSpecId;

    /** 规格名称 */
    private String goodsSpecName;

    /** 商家ID */
    private Integer businessId;

    /** 唯一标识（用于前端树形表格） */
    private String uniqueKey;

    /** 规格值列表 */
    private List<SpecsVO> specsValues;

    public GoodsSpecsTreeVO() {
        this.specsValues = new ArrayList<>();
    }

    public Integer getGoodsSpecId() {
        return goodsSpecId;
    }

    public void setGoodsSpecId(Integer goodsSpecId) {
        this.goodsSpecId = goodsSpecId;
    }

    public String getGoodsSpecName() {
        return goodsSpecName;
    }

    public void setGoodsSpecName(String goodsSpecName) {
        this.goodsSpecName = goodsSpecName;
    }

    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public String getUniqueKey() {
        return uniqueKey;
    }

    public void setUniqueKey(String uniqueKey) {
        this.uniqueKey = uniqueKey;
    }

    public List<SpecsVO> getSpecsValues() {
        return specsValues;
    }

    public void setSpecsValues(List<SpecsVO> specsValues) {
        this.specsValues = specsValues;
    }

    /**
     * 添加规格值
     */
    public void addSpecsValue(SpecsVO specsValue) {
        this.specsValues.add(specsValue);
    }

    /**
     * 规格值VO
     */
    public static class SpecsVO {
        /** 规格值ID */
        private Integer id;

        /** 规格值 */
        private String specsValue;

        /** 规格ID */
        private Integer goodsSpecsId;

        /** 商家ID */
        private Integer businessId;

        /** 唯一标识（用于前端树形表格） */
        private String uniqueKey;

        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public String getSpecsValue() {
            return specsValue;
        }

        public void setSpecsValue(String specsValue) {
            this.specsValue = specsValue;
        }

        public Integer getGoodsSpecsId() {
            return goodsSpecsId;
        }

        public void setGoodsSpecsId(Integer goodsSpecsId) {
            this.goodsSpecsId = goodsSpecsId;
        }

        public Integer getBusinessId() {
            return businessId;
        }

        public void setBusinessId(Integer businessId) {
            this.businessId = businessId;
        }

        public String getUniqueKey() {
            return uniqueKey;
        }

        public void setUniqueKey(String uniqueKey) {
            this.uniqueKey = uniqueKey;
        }
    }
} 